package com.penghaisoft.microwms.base.web.resrole.dao;

import com.penghaisoft.microwms.common.base.model.BaseResRole;
import com.penghaisoft.microwms.common.base.model.BaseResRoleFactory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Title: BaseResRoleMapper.java
 * @Description: 资源角色管理接口
 * @author qh
 * @date 2017/3/1 16:24
 * @version V0.5
 */
public interface BaseResRoleMapper {
	
    int deleteByPrimaryKey(String resroleId);

    int insert(BaseResRole record);
    
    int checkUnique(BaseResRole resrole);

    int insertSelective(BaseResRole record);

    BaseResRole selectByPrimaryKey(String resroleId);

    int updateByPrimaryKeySelective(BaseResRole record);

    int updateByPrimaryKey(BaseResRole record);
    
    int deleteByPrimaryKeys(List<String> resroleIds);
    
    int selectCountByCondition(BaseResRole resrole);
    
    List<BaseResRole> selectListByCondition(BaseResRole condition);
    
    List<BaseResRole> selectAllRoleList(BaseResRole condition);

	List<BaseResRole> queryUserResRole(@Param("loginName") String loginName);

	int queryRoleUnderFactory(@Param("roleId") String roleId, @Param("factoryCode") String factoryCode);

	List<BaseResRoleFactory> queryAllFactory(BaseResRoleFactory condition);

	void deleteAllFactory(BaseResRoleFactory baseResRoleFactory);

	void insertFactoryResroleBatch(List<BaseResRoleFactory> list);
}